package com.ruoyi.technician.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.technician.mapper.TechnicianConsumeDetailMapper;
import com.ruoyi.technician.domain.TechnicianConsumeDetail;
import com.ruoyi.technician.service.ITechnicianConsumeDetailService;

/**
 * 收入明细Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-09
 */
@Service
public class TechnicianConsumeDetailServiceImpl implements ITechnicianConsumeDetailService 
{
    @Autowired
    private TechnicianConsumeDetailMapper technicianConsumeDetailMapper;

    /**
     * 查询收入明细
     * 
     * @param id 收入明细主键
     * @return 收入明细
     */
    @Override
    public TechnicianConsumeDetail selectTechnicianConsumeDetailById(Long id)
    {
        return technicianConsumeDetailMapper.selectTechnicianConsumeDetailById(id);
    }

    /**
     * 查询收入明细列表
     * 
     * @param technicianConsumeDetail 收入明细
     * @return 收入明细
     */
    @Override
    public List<TechnicianConsumeDetail> selectTechnicianConsumeDetailList(TechnicianConsumeDetail technicianConsumeDetail)
    {
        return technicianConsumeDetailMapper.selectTechnicianConsumeDetailList(technicianConsumeDetail);
    }

    /**
     * 新增收入明细
     * 
     * @param technicianConsumeDetail 收入明细
     * @return 结果
     */
    @Override
    public int insertTechnicianConsumeDetail(TechnicianConsumeDetail technicianConsumeDetail)
    {
        technicianConsumeDetail.setCreateTime(DateUtils.getNowDate());
        return technicianConsumeDetailMapper.insertTechnicianConsumeDetail(technicianConsumeDetail);
    }

    /**
     * 修改收入明细
     * 
     * @param technicianConsumeDetail 收入明细
     * @return 结果
     */
    @Override
    public int updateTechnicianConsumeDetail(TechnicianConsumeDetail technicianConsumeDetail)
    {
        technicianConsumeDetail.setUpdateTime(DateUtils.getNowDate());
        return technicianConsumeDetailMapper.updateTechnicianConsumeDetail(technicianConsumeDetail);
    }

    /**
     * 批量删除收入明细
     * 
     * @param ids 需要删除的收入明细主键
     * @return 结果
     */
    @Override
    public int deleteTechnicianConsumeDetailByIds(Long[] ids)
    {
        return technicianConsumeDetailMapper.deleteTechnicianConsumeDetailByIds(ids);
    }

    /**
     * 删除收入明细信息
     * 
     * @param id 收入明细主键
     * @return 结果
     */
    @Override
    public int deleteTechnicianConsumeDetailById(Long id)
    {
        return technicianConsumeDetailMapper.deleteTechnicianConsumeDetailById(id);
    }
}
